package com.jbm.onehome.iface;

import com.jbm.core.iface.IAcross;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by root on 17-7-5.
 */
@Entity
@Table(name = "cg_unit", schema = "", catalog = "")
@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
public class CgUnitEntity extends IAcross
{
	public CgUnitEntity()
	{
		super();
	}

	public CgUnitEntity(IAcross ia)
	{
		super(ia);
	}

	public CgUnitEntity(int code, String info)
	{
		super(code,info);
	}

	public CgUnitEntity(int cgId,int cguId,Integer loginId, Integer memberId, Integer sellerId)
	{
		this();

		this.cgId = cgId;
		this.cguId = cguId;
		this.loginId = loginId;
		this.memberId = memberId;
		this.sellerId = sellerId;
	}

	private int cguId;
	private int cgId;
	private Integer loginId;
	private Integer memberId;
	private Integer sellerId;
	private String type;
	private String status;
	private Timestamp createDate;
	private int createId;

	@Id
	@Column(name = "cgu_id")
	@GeneratedValue
	public int getCguId()
	{
		return cguId;
	}

	public void setCguId(int cguId)
	{
		this.cguId = cguId;
	}

	@Basic
	@Column(name = "cg_id")
	public int getCgId()
	{
		return cgId;
	}

	public void setCgId(int cgId)
	{
		this.cgId = cgId;
	}

	@Basic
	@Column(name = "login_id")
	public Integer getLoginId()
	{
		return loginId;
	}

	public void setLoginId(Integer loginId)
	{
		this.loginId = loginId;
	}

	@Basic
	@Column(name = "member_id")
	public Integer getMemberId()
	{
		return memberId;
	}

	public void setMemberId(Integer memberId)
	{
		this.memberId = memberId;
	}

	@Basic
	@Column(name = "seller_id")
	public Integer getSellerId()
	{
		return sellerId;
	}

	public void setSellerId(Integer sellerId)
	{
		this.sellerId = sellerId;
	}

	@Basic
	@Column(name = "type")
	public String getType()
	{
		return type;
	}

	public void setType(String type)
	{
		this.type = type;
	}

	@Basic
	@Column(name = "status")
	public String getStatus()
	{
		return status;
	}

	public void setStatus(String status)
	{
		this.status = status;
	}

	@Basic
	@Column(name = "create_date")
	public Timestamp getCreateDate()
	{
		return createDate;
	}

	public void setCreateDate(Timestamp createDate)
	{
		this.createDate = createDate;
	}

	@Basic
	@Column(name = "create_id")
	public int getCreateId()
	{
		return createId;
	}

	public void setCreateId(int createId)
	{
		this.createId = createId;
	}

	@Override
	public boolean equals(Object o)
	{
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;

		CgUnitEntity that = (CgUnitEntity) o;

		if (cguId != that.cguId) return false;
		if (cgId != that.cgId) return false;
		if (createId != that.createId) return false;
		if (loginId != null ? !loginId.equals(that.loginId) : that.loginId != null) return false;
		if (memberId != null ? !memberId.equals(that.memberId) : that.memberId != null) return false;
		if (sellerId != null ? !sellerId.equals(that.sellerId) : that.sellerId != null) return false;
		if (type != null ? !type.equals(that.type) : that.type != null) return false;
		if (status != null ? !status.equals(that.status) : that.status != null) return false;

		return true;
	}

	@Override
	public int hashCode()
	{
		int result = cguId;
		result = 31 * result + cgId;
		result = 31 * result + (loginId != null ? loginId.hashCode() : 0);
		result = 31 * result + (memberId != null ? memberId.hashCode() : 0);
		result = 31 * result + (sellerId != null ? sellerId.hashCode() : 0);
		result = 31 * result + (type != null ? type.hashCode() : 0);
		result = 31 * result + (status != null ? status.hashCode() : 0);
		result = 31 * result + createId;
		return result;
	}

	@Transient
	public String getAccount()
	{
		return account;
	}

	@Transient
	public void setAccount(String account)
	{
		this.account = account;
	}

	@Transient
	public String getNickname()
	{
		return nickname;
	}

	@Transient
	public void setNickname(String nickname)
	{
		this.nickname = nickname;
	}

	@Transient
	public String getFullname()
	{
		return fullname;
	}

	@Transient
	public void setFullname(String fullname)
	{
		this.fullname = fullname;
	}

	@Transient
	public String getMobile()
	{
		return mobile;
	}

	@Transient
	public void setMobile(String mobile)
	{
		this.mobile = mobile;
	}

	@Transient
	public String getMember()
	{
		return member;
	}

	@Transient
	public void setMember(String member)
	{
		this.member = member;
	}

	@Transient
	public String getSeller_code()
	{
		return seller_code;
	}

	@Transient
	public void setSeller_code(String seller_code)
	{
		this.seller_code = seller_code;
	}

	@Transient
	public String getSeller_name()
	{
		return seller_name;
	}

	@Transient
	public void setSeller_name(String seller_name)
	{
		this.seller_name = seller_name;
	}

	@Transient
	public String getSeller_mobile()
	{
		return seller_mobile;
	}

	@Transient
	public void setSeller_mobile(String seller_mobile)
	{
		this.seller_mobile = seller_mobile;
	}

	@Transient
	private String account;
	@Transient
	private String nickname;
	@Transient
	private String fullname;
	@Transient
	private String mobile;
	@Transient
	private String member;
	@Transient
	private String seller_code;
	@Transient
	private String seller_name;
	@Transient
	private String seller_mobile;

	@Transient
	public String getLogo()
	{
		return logo;
	}

	@Transient
	public void setLogo(String logo)
	{
		this.logo = logo;
	}

	@Transient
	private String logo;
}
